package com.microservices.cloud.service;

import com.microservices.cloud.config.FeignConfig;
import com.microservices.cloud.entities.CommonResult;
import com.microservices.cloud.entities.Payment;
import com.microservices.cloud.service.fallback.PaymentFallBackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "nacos-payment-provider",contextId = "nacos-payment-provider", fallback = PaymentFallBackService.class,configuration = FeignConfig.class)
public interface PaymentService {

    @GetMapping(value = "/payment/nacos/{id}")
    CommonResult<Payment> getPayment(@PathVariable("id") Long id);


}
